package Thread.Safe;

public class Runnable01 implements  Runnable {
    //指定票数为100
    private int tickets=100;
    @Override
    public void run() {
       while (tickets>0){
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("正在卖地第"+tickets+"张票");
            tickets--;
        }
    }
}
